package com.hyt.it.ogt.ks.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import lombok.Getter;

/**
 * 配置信息管理
 * @author 刘恒活
 * @since 2020/12/10 8:45
 */

@Component
@RefreshScope
@Getter
public class ConfigManager {
    @Value("${mq.direct}")
    private String direct;
    @Value("${mq.candidateUpdate.route}")
    private String candidateUpdateRoute;
    @Value("${mq.candidateUpdate.queue}")
    private String candidateUpdateQueue;
    @Value("${server.ip}")
    private String serverIP;
    @Value("${websocket.url}")
    private String websocketUrl;
    @Value("${websocket.timeOut}")
    private int websocketTimeOut;
    @Value("${file.nginxPath}")
    private String nginxPath;
    @Value("${QRCode.downloadUrl.android}")
    private String androidQRCodeUrl;
    @Value("${QRCode.downloadUrl.ios}")
    private String iosQRCodeUrl;
    @Value("${app.finishExamState}")
    private Integer finishExamState;
    @Value("${app.imageUrl}")
    private String appImageUrl;
    @Value("${app.timeInterval}")
    private Integer appTimeInterval;
    @Value("${app.ios.downloadUrl}")
    private String iosDownloadUrl;
    @Value("${app.ios.version}")
    private String iosVersion;
    @Value("${app.android.downloadUrl}")
    private String androidDownloadUrl;
    @Value("${app.android.version}")
    private String androidVersion;
    @Value("${pc.win.downloadUrl}")
    private String winDownloadUrl;
    @Value("${pc.win.sgaDownloadUrl}")
    private String sgaDownloadUrl;//深港澳下载地址
    @Value("${pc.win.version}")
    private String winVersion;
    @Value("${pc.win.update.downloadUrl}")
    private String updateWinDownloadUrl;
    @Value("${pc.win.update.version}")
    private String updateWinVersion;
    @Value("${pc.win.update.fileName}")
    private String updateWinFileName;
    @Value("${pc.win.update.fileMD5}")
    private String updateWinFileMD5;
    @Value("${pc.win.update.password}")
    private String updateWinPassword;
    @Value("${pc.win.update.flag}")
    private String updateWinFlag;
    @Value("${pc.win.update.time}")
    private String updateWinTime;
    @Value("${pc.win.update.opc}")
    private String updateWinOpc;
    @Value("${pc.win.update.pnList}")
    private String updateWinPnList;
    @Value("${pc.win.update.pcList}")
    private String updateWinPcList;
    @Value("${pc.mac.appleDownloadUrl}")
    private String macAppleDownloadUrl;
    @Value("${pc.mac.intelDownloadUrl}")
    private String macIntelDownloadUrl;
    @Value("${pc.mac.sgaAppleDownloadUrl}")
    private String macSgaAppleDownloadUrl;
    @Value("${pc.mac.sgaIntelDownloadUrl}")
    private String macSgaIntelDownloadUrl;
    @Value("${pc.mac.version}")
    private String macVersion;
    @Value("${authentication.enabled}")
    private String enabled;
    @Value("${authentication.candidateIds}")
    private String candidateIds;
    @Value("${candidate.dataInitTime}")
    private Integer candidateDataInitTime;
    @Value("${candidate.passAppMonitoringPwd}")
    private String passAppMonitoringPwd;
    @Value("${xyEval.requestUrl}")
    private String xyEvalRequestUrl;
    @Value("${dayiAssess.requestUrl}")
    private String dayiAssessRequestUrl;
    @Value("${dayiAssess.corpCode}")
    private String dayiCorpCode;
    @Value("${dayiAssess.userName}")
    private String dayiUserName;
    @Value("${dayiAssess.password}")
    private String dayiPassword;
    @Value("${paper.from}")
    private String paperFrom;
    @Value("${guideType.school}")
    private Integer guideTypeSchool;
    @Value("${guideType.social}")
    private Integer guideTypeSocial;
    @Value("${paper.allowInitTime}")
    private Integer paperAllowInitTime;
    @Value("wx.appid")
    private String wxAppId;
    @Value("wx.secret")
    private String wxAppSecret;
    @Value("${interview.requestUrl}")
    private String interviewRequestUrl;
    @Value("${interview.appId}")
    private String interviewAppId;
    @Value("${interview.secret}")
    private String interviewSecret;
    @Value("${interview.examIds}")
    private String interviewexamIds;
    @Value("${interview.modeId}")
    private String interviewModeId;
    @Value("${wx.qrcode.default}")
    private String wxDefaultQRCode;
    @Value("${wx.qrcode.width}")
    private Integer wxDefaultQRCodeWidth;
    @Value("${wx.qrcode.page}")
    private String wxDefaultQRCodePage;
    @Value("${mq.ksDirect}")
    private String ksDirect;//考试中心路由
    @Value("${mq.initCandidateData.ksRoute}")
    private String initCandidateDataKsRoute;//考试考生试卷初始化路由key
    @Value("${mq.initCandidateData.ksQueue}")
    private String initCandidateDataKsQueue;
    @Value("${mq.initCandidateData.threads}")
    private Integer initCandidateDataThread;//考试考生试卷初始化线程数
    @Value("${codingQuestion.requestUrl}")
    private String codingQuestionRequestUrl;
    @Value("${codingQuestion.appId}")
    private String codingQuestionAppId;
    @Value("${codingQuestion.secret}")
    private String codingQuestionSecret;
    @Value("${mq.candidateAnswerLog.queue}")
    private String candidateAnswerLogQuere;
    @Value("${mq.candidateAnswerLog.route}")
    private String candidateAnswerLogRoute;
    @Value("${mq.downloadFaceValidPhoto.route}")
    private String downloadFaceValidPhotoRoute;
    @Value("${mq.downloadFaceValidPhoto.queue}")
    private String downloadFaceValidPhotoQueue;
    @Value("${bucket.photoPath}")
    public String photoBucketPath;
    @Value("${bucket.screenshotPath}")
    public String screenshotPath;
    @Value("${mq.candidateAnswerLog.capacity}")
    private Integer candidateAnswerLogCapacity;
    @Value("${log.active}")
    private Boolean logActive;
    /**
     * 考生试题表移动至备份库一次处理数量
     */
    @Value("${answer.size}")
    private Integer candidateAnswerBackupSize;
    @Value("${answer.thread}")
    private Integer candidateAnswerBackupThread;
    @Value("${answer.enable}")
    private Integer candidateAnswerBackupEnable;
    @Value("${answer.logEnable}")
    private Integer candidateLogBackupEnable;
    @Value("${clear.data.size}")
    private Integer clearDataSize;

    /**
     * 定时保存答案时间间隔
     */
    @Value("${saveAnswer.interval}")
    private Integer saveAnswerInterval;

    @Value("${saveAnswer.outTimeSecond}")
    private Integer saveOutTimeSecond;

    @Value("${pictureItem.limit}")
    private Integer pictureItemLimit;

    @Value("${pictureItem.maxSize}")
    private Integer pictureItemMaxSize;

    @Value("${fileItem.audio.limit}")
    private Integer audioItemLimit;

    @Value("${fileItem.audio.maxSize}")
    private Integer audioItemMaxSize;

    @Value("${fileItem.attachment.limit}")
    private Integer attachmentItemLimit;

    @Value("${fileItem.attachment.maxSize}")
    private Integer attachmentItemMaxSize;

    /**
     * 用于设置考试信息二缓存缓存刷新时间
     */
    @Value("${exam.cache.expire}")
    private Integer examCacheExpire = 10;

    @Value("${oauth2.client_id}")
    private String oauthClientId;

    @Value("${oauth2.client_secret}")
    private String oauthClientSecret;

    @Value("${sendAgainAfterSecond}")
    private Integer sendAgainAfterSecond;

    @Value("${screenShot.compressPercentage}")
    private String screenShotCompressPercentage;

    @Value("${logEvent.capacity}")
    private Integer logEventCapacity;
}
